In image processing, edge detection is often a necessary step in methods for object detection and recognition. For example, many current face detection methods include edge detection as part of their operation. Optimally, an edge detection method would accurately detect every edge in the image, and represent each edge in a line of single pixel width. These characteristics of an edge image improve the accuracy of later image processing steps. Traditional edge detection methods look for abrupt changes in intensity between adjacent or nearby pixels.
In actual operation, a number of difficulties arise when detecting edges within a variety of differing images. For example, some images may contain similar objects that overlap, such as two people wearing similar clothing. Often, images vary greatly in contrast and exposure creating difficult situations where edges are difficult to distinguish. Even within a single edge, within a single image, the color and intensity of the edge may vary due along the edge to the way light and shadow fall on different portions of the edge. All of these problems increase the difficulty of accurately detecting edges in a variety of common situations.